/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.thinkgem.jeesite.modules.order.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.validator.constraints.Length;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.modules.sys.entity.User;

/**
 * 取货单Entity
 * 
 * @author 李忠
 * @version 2013-07-28
 */
@Entity
@Table(name = "order_quhuodan")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class QuHuoDan extends DataEntity {

	private static final long serialVersionUID = 1L;
	private Long id; // 编号
	private String no; // 订单号

	private String dangkou;// 取货档口

	private String shouhuoren;// 收货人

	private User qhrUser;// 取货人

	private Integer baoshu;// 包数

	private String mudidi;// 目的地

	private String shfs;// （0：整送；1：拆送）
	private String shqd;// 送货方式(0：直航；1：空转；2：铁快；3：行邮)

	private Date hdsj;// 核对时间

	public QuHuoDan() {
//		super();
		this.delFlag = "1";
	}

	public QuHuoDan(Long id) {
		this();
		this.id = id;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	// @GeneratedValue(strategy = GenerationType.SEQUENCE, generator =
	// "seq_order_quHuoDan")
	// @SequenceGenerator(name = "seq_order_quHuoDan", sequenceName =
	// "seq_order_quHuoDan")
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(length = 50)
	public String getNo() {
		return no;
	}

	public void setNo(String no) {
		this.no = no;
	}

	@Column(length = 1)
	public String getShqd() {
		return shqd;
	}

	public void setShqd(String shqd) {
		this.shqd = shqd;
	}

	@Length(min = 1, max = 50)
	public String getDangkou() {
		return dangkou;
	}

	public void setDangkou(String dangkou) {
		this.dangkou = dangkou;
	}

	@Length(min = 1, max = 50)
	public String getShouhuoren() {
		return shouhuoren;
	}

	public void setShouhuoren(String shouhuoren) {
		this.shouhuoren = shouhuoren;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "qhr_user_id")
	public User getQhrUser() {
		return qhrUser;
	}

	public void setQhrUser(User qhrUser) {
		this.qhrUser = qhrUser;
	}

	public Integer getBaoshu() {
		return baoshu;
	}

	public void setBaoshu(Integer baoshu) {
		this.baoshu = baoshu;
	}

	@Column(length = 1)
	public String getShfs() {
		return shfs;
	}

	public void setShfs(String shfs) {
		this.shfs = shfs;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getHdsj() {
		return hdsj;
	}

	public void setHdsj(Date hdsj) {
		this.hdsj = hdsj;
	}

	@Column(length = 50)
	public String getMudidi() {
		return mudidi;
	}

	public void setMudidi(String mudidi) {
		this.mudidi = mudidi;
	}

}
